import { Color } from 'three';
import { ValueData } from '../base-data';

/**
 * RGB颜色类型数据
 */
class Color3Data extends ValueData<Color>{

    protected generate(from: Color): Color {
        return new Color().copy(from);
    }

    protected equal(a: Color, b: Color): boolean {
        return a.r === b.r && a.g === b.g && a.b === b.b;
    }

    protected copy(targetContainer: Color[], source: Color): void {
        targetContainer[0].copy(source);
    }

}


export { Color3Data };